package dk.dtu.is.jjmvcp.model;
import java.beans.*;

/**
 * Base class for JavaBean that contains a protected Property-Change Support member 
 * and implementations of these two methods; </br></br>
 * 
 * Regarding this class, see also "14.3 Writing the JavaBeans" in "Jess in Action"
 * 
 * @author dsac
 */
public abstract class BeanSupport {

	protected PropertyChangeSupport pcs = new PropertyChangeSupport(this);

	/**
	 * It adds a listener for the propery change event.
	 * @param p The listener which will handle the propery change event
	 */
	public void addPropertyChangeListener(PropertyChangeListener p) {
		pcs.addPropertyChangeListener(p);
	}

	/**
	 * It removes a listener for the propery change event.
	 * @param p The listener which will handle the propery change event
	 */
	public void removePropertyChangeListener(PropertyChangeListener p) {
		pcs.removePropertyChangeListener(p);
	}
}

